package com.aabte.nettyleran.netty.http.xml.entity;

import com.google.common.collect.Lists;

import java.math.BigDecimal;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/3/14
 */
public class OrderFactory {

    public static Order createOrder(long id) {
        Customer customer = Customer.builder()
                .customerNumber(1L)
                .fistName("Michael")
                .lastName("Jackson")
                .middleNames(Lists.newArrayList("Joseph"))
                .build();

        Address address = Address.builder()
                .country("中国")
                .city("杭州")
                .state("浙江")
                .street1("长河")
                .street2("222")
                .postCode("123456")
                .build();

        return Order.builder()
                .orderNumber(id)
                .customer(customer)
                .billTo(address)
                .shipTo(address)
                .shipping(Shipping.DOMESTIC_EXPRESS)
                .total(new BigDecimal("8888.88"))
                .build();
    }
}
